Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a proposal to allow nonisolated to prevent global actor inference. #2560

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

simanerush
Copy link
Contributor

This proposal allows annotating a set of declarations with nonisolated to prevent global actor inference.

Read full proposal...

@simanerush simanerush force-pushed the nonisolated-for-global-actor-cutoff branch from e09f2d6 to 968e64c Compare September 11, 2024 00:38
ktoso and others added 2 commits September 11, 2024 10:55
The first code snippet has some non-correct code that would not compile. It's showcasing the bad workaround, but still, it should be compiling code :)
Fix some code snippets in NNNN-nonisolated-for-global-actor-cutoff.md
@simanerush simanerush force-pushed the nonisolated-for-global-actor-cutoff branch from cc2f805 to 30d8859 Compare September 11, 2024 04:03
@simanerush simanerush force-pushed the nonisolated-for-global-actor-cutoff branch from 30d8859 to 2514d13 Compare September 11, 2024 04:38
@Jumhyn
Copy link
Member

Jumhyn commented Sep 11, 2024

I had a hard time understanding rules 3 and 4 because they don't really seem to be related to global actor isolation at all even though that's the framing of the document. I also don't really see those rules discussed in the motivation section nor mentioned in the proposed solution section, unless I'm totally missing something?

@simanerush
Copy link
Contributor Author

@Jumhyn good point! I can restructure the proposal a bit to make it clear that while these rules are not strictly related to global actor cut-off, they still enable nonisolated to be written in more places than today.

@Jumhyn
Copy link
Member

Jumhyn commented Sep 11, 2024

@simanerush Thanks, I think that restructuring reads a lot better!! I might even argue for dropping any mention of global actors from the document title as well, since I think that sets the stage wrong. But also I see how perhaps the global actor bits are the 'primary' focus and the other parts are more ancillary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants